package cn.roadtrip.utilmodule.util.enumpck;

/**
 * 领队分配记录状态
 */
public enum Enum_LeaderDispatchStats {
    //-；-
    Wait("Wait", "待同意"),
    //-；-
    Cancel("Cancel", "取消"),
    Apply("Apply", "同意");

    private String s;
    private String title;

    Enum_LeaderDispatchStats(String s, String title) {
        this.s = s;
        this.title = title;
    }

    Enum_LeaderDispatchStats(String s) {
        this.s = s;
        this.title = Enum_HotelRoomType.parseCode(s).getTitle();
    }

    public String getTitle() {
        return this.title;
    }

    public String getCode() {
        return this.s;
    }

    public static final Enum_LeaderDispatchStats parseCode(String code) {
        switch (code) {
            case "Wait":
                return Wait;
            case "Cancel":
                return Cancel;
            case "Apply":
                return Apply;
        }
        return null;
    }

    @Override
    public String toString() {
        return "(code:%s, title:%s)".formatted(this.s, this.title);
    }

}
